﻿CREATE TABLE [dbo].[Customers]
(
	[Id] BIGINT NOT NULL PRIMARY KEY Identity,
	[Account] varchar(20) not null,
	[ServiceCode] varchar(10) not null,
	[Password] varchar(50) not null,
	[AgentCode] varchar(10) not null,
	[Corperation] varchar(100),
	[TradeId] bigint default(0),
	[Linkman] varchar(20) not null,
	[Mobile] varchar(15) not null,
	[Phone] varchar(20),
	[Email] varchar(100),
	[Province] varchar(50) not null,
	[City] varchar(50) not null,
	[Address] varchar(200) not null,
	[Postcode] varchar(7),
	[Signature] varchar(20),
	[Balance] bigint not null default(0),
	[TotalCharge] bigint not null default(0),
	[TotalSpend] bigint not null default(0),
	[Subaccount] bit not null default(0),
	[BillingKind] int not null default(0),
	[Status] int not null default(1),
	[RegisterTime] datetime not null default(getdate()),
	[LastLogin] datetime,
)

GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'编号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Customers',
    @level2type = N'COLUMN',
    @level2name = N'Id'
GO
EXEC sp_addextendedproperty @name = N'MS_Description',
    @value = N'账号',
    @level0type = N'SCHEMA',
    @level0name = N'dbo',
    @level1type = N'TABLE',
    @level1name = N'Customers',
    @level2type = N'COLUMN',
    @level2name = N'Account'